<template>
    <div class="new_stuff">
        <div class="recommend-head clearfix">
            <div class="box1">{{ stuff.title }}</div>
            <a href="javascript:" class="box2">更多商品</a>
        </div>

        <div class="stuff-picture" v-for="(product,index) in stuff.productList" :key="product.id">
            <a href="javascript:" class="link">
                <img v-lazy="product.imgUrl" />
            </a>
            <!--此处放商品描述-->
            <a href="javascript:" class="stuff-picture-descript">{{product.descript}}</a>
        </div>
    </div>
</template>

<script>
export default {
    props: ["stuff"],
};
</script>

<style scoped>
.new_stuff {
    width: 595px;
    height: 100%;
}

.recommend-head {
    height: 40px;
    width: 95%;
    margin: 10px auto 20px;
    border-bottom: 1px solid rgb(245, 245, 245);
}

.recommend-head .box1 {
    float: left;
    color: red;
    font: bold 17px/40px PingFangSC-Medium, arial, sans-serif;
}

.recommend-head .box2 {
    text-decoration: none;
    color: #333;
    float: right;
    font: 14px/40px PingFangSC-Medium, arial, sans-serif;
}

.recommend-head .box2:hover {
    text-decoration: underline;
    color: red;
    float: right;
    font: 14px/40px PingFangSC-Medium, arial, sans-serif;
}

.stuff-picture {
    float: left;
    width: 40%;
    padding: 5px;
    margin-left: 30px;
}

.link img {
    width: 100%;
}

.link,
.stuff-picture-descript {
    text-decoration: none;
    display: block;
}

.stuff-picture-descript {
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 7px;
    color: #333333;
    font: 15px PingFangSC-Medium, arial, sans-serif;
}

.link:hover + .stuff-picture-descript {
    text-decoration: underline;
    color: red;
}
</style>